package com.tsd.system.service;

import com.tsd.core.vo.PageBean;
import com.tsd.system.entity.SysRoleDataAccessRule;
import com.tsd.system.entity.SysRoleDataAccessRuleExt;
import com.tsd.system.entity.SysUser;

import java.util.List;
import java.util.Map;

/**
 * 描述：SysRoleDataAccessRule服务实现层接口
 *
 * @author david
 * @date 2021/07/08 15:49:18
 */
public interface SysRoleDataAccessRuleService {

    /**
     * 描述：根据id获取SysRoleDataAccessRule
     *
     * @param id
     */
    SysRoleDataAccessRule getSysRoleDataAccessRuleById(Long id) throws Exception;

    /**
     * 描述：根据sid获取SysRoleDataAccessRule
     *
     * @param sid
     */
    SysRoleDataAccessRuleExt queryBySid(String sid) throws Exception;

    /**
     * 描述：根据id删除SysRoleDataAccessRule
     *
     * @param id
     */
    void deleteSysRoleDataAccessRule(Long id, SysUser opUser) throws Exception;

    /**
     * 描述：保存或更新SysRoleDataAccessRule
     *
     * @param record
     * @param opUser
     */
    void saveSysRoleDataAccessRule(SysRoleDataAccessRule record, SysUser opUser) throws Exception;

    /**
     * 描述：根据params分页查询SysRoleDataAccessRule
     *
     * @param params
     * @param page
     */
    List<SysRoleDataAccessRuleExt> findSysRoleDataAccessRules(Map<String, Object> params, PageBean page) throws Exception;

    /**
     * 描述：根据params分页查询SysRoleDataAccessRule
     *
     * @param params
     */
    List<SysRoleDataAccessRuleExt> findSysRoleDataAccessRules(Map<String, Object> params) throws Exception;

    void saveSysRoleDataAccessRuleList(List<SysRoleDataAccessRule> list, SysUser opUser) throws Exception;

    List<SysRoleDataAccessRule> queryValidByRoleList(List<String> roleList) throws Exception;
}
